import java.util.Scanner;

public class OPPOa的翻转 {
    //https://www.nowcoder.com/practice/dcce2d0cc8f740c29e0885df96c9d625?tpId=376&tqId=10816557&ru=/exam/oj&qru=/ta/15-days-help/question-ranking&sourceUrl=%2Fexam%2Foj%3Fpage%3D1%26tab%3D%25E7%25AE%2597%25E6%25B3%2595%25E9%259D%25A2%25E8%25AF%2595%26topicId%3D376
    //主要考察对Java的运用
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        StringBuilder sb = new StringBuilder();
        sb.append(a);
        int b = Integer.parseInt(sb.reverse().toString());
        int sum = a + b;
        System.out.println(sum);
    }

}
